package com.chixing.controller;

import com.chixing.commons.Result;
import com.chixing.pojo.ResumeTemplate;
import com.chixing.service.IResumeTemplateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 * 简历表 前端控制器
 * </p>
 *
 * @author Jason Marslyon
 * @since 2022-10-04
 */
@Controller
@RequestMapping("/resume")
public class ResumeController {

    @Autowired
    IResumeTemplateService resumeTemplateService;

    @RequestMapping("initData")
    @ResponseBody
    public Result initResume(){
        List<ResumeTemplate> resumeTemplates = resumeTemplateService.selectAll();
        resumeTemplates.forEach(System.out::println);
        return new Result(20000,"成功",resumeTemplates);
    }
}
